/*--------------------store中export type-------------------------------- */
export type sourceType = {
    text: string,
    href: string,
    isLike?:boolean
}
export type hisInfoType = {
    id: number,
    source: sourceType,
    playTimeMS: number
}
export type stateOfDispatchType = {
    SET_STATE: (state: stateType, value: partStateType) => stateType,
    DELETE_ALL: (state: stateType) => stateType,
    DELETE_HIS: (state: stateType) => stateType,
    SET_SHOW: (state: stateType, value: partStateType) => stateType,
    TOPLAY: (state: stateType) => stateType,
    TOPAUSE: (state: stateType) => stateType,
    SET_CURRENTTIME: (state: stateType,
        value: { currentTime: number }
    ) => stateType,
    SET_USERDATA:(
        state:stateType,
        value:{userData:userDataType|null}
        )=>stateType,
    [key:string]:any
}
export type typeOfDisType =
    'SET_STATE'
    | 'DELETE_ALL'
    | 'DELETE_HIS'
    | 'DELETE_HIS'
    | 'SET_SHOW'
    | 'TOPLAY'
    | 'TOPAUSE'
    | 'SET_CURRENTTIME'
    | 'SET_USERDATA'
export type songsInfoPlayType = {
    id: number,
    source: sourceType
}
export type playInfoType = {
    playingId: number,
    isPlay: boolean,
    playingIndex: number,
    currentTime: number//秒数
}
export type likeSongType = {
    id:number
}
export type songsLikeType={
    changeTag:boolean,
    value:Array<likeSongType>
}
export type partStateType = {
    songsInfoPlay?: Array<songsInfoPlayType>,
    songsInfoHis?: Array<hisInfoType>,
    playInfo?: playInfoType,
    showList?: boolean,
    sIPC?: boolean,
    sIHC?: boolean,
    userData?:userDataType | null
}
export type dispatchType = {
    type: typeOfDisType,
    value?: partStateType | { currentTime: number }
}
export type contxetType = {
    state: stateType,
    dispatch: (a: dispatchType) => void
}
export type stateType = {
    songsInfoPlay: Array<songsInfoPlayType>,
    songsInfoHis: Array<hisInfoType>,
    songsLike:songsLikeType,
    playInfo: playInfoType,
    showList: boolean,
    sIPC: boolean,
    sIHC: boolean,
    userData:userDataType | null
}
export type userDataType = {
    uid:number
}
/*^^^^^^^^^^^^^^^^^store中export type^^^^^^^^^^^^^^^^^^^^^^^^ */
export type lyricType = {
    timeS: number,
    text: string,
    ttext:string | null,
}
export type myImgPropsType={
    style?:React.CSSProperties,
    src:string,
    className?:string,
    loading?:'lazy'|'eager',
    placeholderSrc?:string,
    alt?:string,
    imgSize:{width:number,height?:number},
    disablePreLoad?:boolean,
    imgBlurMultiple?:number
}
export type myImgStateType = {
    src:string|undefined,
    style?:React.CSSProperties,
    className?:string,
    loading?:'lazy'|'eager',
    placeholderSrc?:string,
    alt?:string,
    imgSize:{width:number,height?:number},
    disablePreLoad?:boolean,
    imgBlurMultiple?:number,
    width:number,
    height:number
}
export type userPageTopType=Array<{ text: string, getValue: (userDetail: any) => number }>
